<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html lang="zh-CN">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <meta name="author" content="coolwind">
        <title>欢迎来到听海小筑！</title>
        <link href="<c:url value="/js/libs/twitter-bootstrap/css/bootstrap.min.css"/>" rel="stylesheet"/>
        <link href="<c:url value="/js/libs/jqueryui/css/jquery.ui.datepicker.min.css"/>" rel="stylesheet"/>
        <link href="<c:url value="/common/css/common.css"/>" rel="stylesheet" />
        <link href="<c:url value="/common/css/bloglist.css"/>" rel="stylesheet"/>
        <script type="text/javascript" src="<c:url value="/js/libs/jquery/jquery.min.js"/>"></script>
        <script type="text/javascript" src="<c:url value="/js/libs/jqueryui/jquery-ui.min.js"/>"></script>
        <script type="text/javascript" src="<c:url value="/js/libs/twitter-bootstrap/js/bootstrap.min.js"/>"></script>
    </head>

    <body>
        <c:import url="/common/header"/>
        <div class="banner">

        </div>
        <div class="container-fluid container-x container-up">
            <div class="blog-info-content">
                <c:forEach items="${blogList}" var="blog" varStatus="idx">
                    <div class="blog-info-item" id="blog-info-1">
                        <div class="blog-info-time">
                            <time datetime="${blog.getBlogDate()}" pubdate>

                                <span class="day">${blog.getBlogDate().toString().split("-")[2]}</span>
                                <span class="month">${blog.getBlogDate().toString().split("-")[1]}</span>
                                <span class="year">${blog.getBlogDate().toString().split("-")[0]}</span>
                            </time>
                        </div>
                        <div class="blog-info-article">
                            <article>
                                <h1><a href="<c:url value="/blog/${blog.getBlogId()}" />">${blog.getBlogTitle()}</a></h1>
                                <h6>作者：${userNameList.get(idx.index)} 标签：${tagNameList.get(idx.index)}</h6>
                                <p>${blog.getBlogContent()}</p>
                            </article>
                        </div>
                        <div class="blog-info-clear"></div>
                    </div>
                    <div class="blog-info-menu">
                        <ul class="nav blog-info-list">
                            <li><a href="<c:url value="/blog/${blog.getBlogId()}" />">阅读</a></li>
                            <!--<li><a href="">评论</a></li>-->
                        </ul>
                    </div>
                </c:forEach>
                <%--
                <div class="pagination-bar">
                    <ul class="pagination">
                        <li><a href="">&laquo;</a></li>
                            <% for (int i = 0; i < 8; i++) {%>
                        <li><a href=""><%=i + 1%></a></li>
                            <% }%>
                        <li><a href="">&raquo;</a></li>
                    </ul>
                </div>
                --%>
                <c:import url="/common/pagination/${total}/${page}"/>
            </div>
            <div class="sidebar">
                <div class="sidebar-content">
                    <div id="datepicker"></div>
                    <script type="text/javascript">
                        $('#datepicker').datepicker();
                    </script>
                </div>
                <div class="sidebar-content">
                    <h4>标签：</h4>

                    <ul>
                        <c:forEach items="${tagList}" var="tag">
                            <li><a href="">${tag.getTagName()}</a></li>
                        </c:forEach>
                    </ul>
                    <div>
                        <a href="#">查看更多&gt;&gt;</a>
                    </div>
                </div>
                <div class="sidebar-content">
                    <h4>按归档日期显示：</h4>
                    <ul>
                        <c:forEach items="${archList}" var="arc">
                            <li><a href="">${arc}</a></li>
                            </c:forEach>
                    </ul>
                    <div>
                        <a href="#">查看更多&gt;&gt;</a>
                    </div>
                </div>

            </div>
        </div>
        <c:import url="/common/footer"/>
    </body>
</html>
